package com.rajeshDyadav.serialization;

import java.io.*;

public class Deserialize {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
	FileInputStream fileIn = new FileInputStream("employee.txt");
	ObjectInputStream in = new ObjectInputStream(fileIn);
	Employee e = (Employee) in.readObject();
	in.close();
	fileIn.close();

	System.out.println("Deserialized Employee...");
	System.out.println("Name: " + e.name);
	System.out.println("Address: " + e.address);
	System.out.println("SSN: " + e.SSN);
	System.out.println("Number: " + e.number);
	e.mailCheck();
	e.departmentInfo();
    }
}